﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Scribd.Net.Requests
{
    /// <summary>
    /// Returns a list of categories or subcategories.
    /// </summary>
    public class GetCategories : Request
    {
        public GetCategories()
        {
            this.MethodName = "docs.getCategories";
        }

        /// <summary>
        /// The ID of category to retrieve children for. If none - all root categories will be returned.
        /// </summary>
        public int CategoryID
        {
            get
            {
                return this.GetIntParam("category_id");
            }
            set
            {
                this.Parameters.Add("category_id", value.ToString());
                this.OnPropertyChanged("CategoryID");
            }
        }

        /// <summary>
        /// Include subcategories in results.
        /// </summary>
        public bool WithSubscriptions
        {
            get
            {
                return this.GetBooleanParam("with_subcategories");
            }
            set
            {
                this.Parameters.Add("with_subcategories", value ? "true" : "false");
                this.OnPropertyChanged("WithSubscriptions");
            }
        }

       
    }
}
